package com.abel.bigwater.dataserver.model.h86a

import io.netty.buffer.ByteBuf

class H86AWarnChannel : H86AChannelBase<Short>(H86AChannelType.WarnType, 1) {
    /**
     * compute length of bytes.
     */
    override fun bufLength() = 2

    override fun parseBuffer(buf: ByteBuf): Boolean {
        buf.readBytes(bufLength()).apply {
            super.parseBuffer(this)

            values.add(readUnsignedByte())
        }

        return true
    }
}